#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2021/3/17 20:37
# @Author  : Crissu
# @Site    : 
# @File    : test2.py
# @Software: PyCharm

# from ResultProcessing.configs import universalConfig
# if __name__ == '__main__':
#     print(universalConfig.class2idxMap['139yu_dai_feng_die'])
import xlrd
def readLstXls(path):
    '''
    :param path: .xls 路径
    :return: None
    '''
    workbook = xlrd.open_workbook(path)  # 打开工作簿
    sheets = workbook.sheet_names()  # 获取工作簿中的所有表格
    worksheet = workbook.sheet_by_name(sheets[0])  # 获取工作簿中所有表格中的的第一个表格
    results = list()
    # 计算正确个数和分类总个数
    for i in range(0, worksheet.nrows):
        name = str(worksheet.cell_value(i, 0))
        results.append(name)

    print(results)
book_name_xls = 'table_className_pinyin.xls'
readLstXls(book_name_xls)